package com.finace.money.ui.activity;

import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.finace.money.R;
import com.finace.money.common.Constant;
import com.finace.money.common.util.UIUtil;
import com.finace.money.di.component.AppComponent;

import butterknife.BindView;

/**
 * Created by zhangpeng on 2018/1/30.
 */

public class OpenAccountSucessActivity extends BaseActivity implements View.OnClickListener {
    @BindView(R.id.rl_left)
    RelativeLayout rlLeft;
    @BindView(R.id.tv_head_title)
    TextView tvHeadTitle;
    @BindView(R.id.button_back_home)
    Button buttonBackHome;
    @BindView(R.id.tv_tip_email)
    TextView tvTipEmail;

    @Override
    public int setLayout() {
        return R.layout.activity_open_account_sucess;
    }

    @Override
    public void init() {

        rlLeft.setOnClickListener(this);
        buttonBackHome.setOnClickListener(this);
        tvHeadTitle.setText(UIUtil.getString(R.string.open_account_sucess));
        String email = getIntent().getStringExtra(Constant.email);
        tvTipEmail.setText(getString(R.string.email_tip_one)+email+getString(R.string.email_tip_two));
    }

    @Override
    public void setupAcitivtyComponent(AppComponent appComponent) {

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.rl_left:
                onBackPressed();
                break;
            case R.id.button_back_home:
                goHome(0);
                break;
        }
    }

}
